# Generate the js_resources.inc file
# jsCodeInclFile = open("src/js_resources.inc", "w")
# 
# for filename in os.listdir("resources/js"):
# 	if filename.endswith(".js"):
# 		f = open("resources/js/"+filename, "r")
# 		jsCodeInclFile.write("#ifndef JS_RESOURCES\n#define JS_RESOURCES\n")
# 		jsCodeInclFile.write("#define JS_RESOURCE_"+filename.replace(".", "_")+" \"")
# 		jsCodeInclFile.write(f.read().replace("\\", "\\\\").replace("\n", "\\n\\\n").replace("\"", "\\\""))
# 		jsCodeInclFile.write("\"\n")
# 		jsCodeInclFile.write("#endif\n")
# 		f.close()
# 
# jsCodeInclFile.close()		


envLib = Environment()
envLib['LIBS'] = ['kit', 'uth', 'boost_thread-mt', 'boost_regex-mt', 'expat', 'webkit-1.0'];
envLib['LIBPATH'] = ['../kit', '../uth', '/opt/local/lib', '../webkit.tmp/lib'];
envLib['CPPPATH'] = ['../kit/src', '../uth/src', '/opt/local/include', '../webkit.tmp/include'];
envLib['CPPDEFINES'] = [];
envLib.Library('phnqlets', Glob('src/*.cc'))

envProg = Environment()
envProg['LIBS'] = ['phnqlets', 'kit', 'uth', 'boost_thread-mt', 'boost_regex-mt', 'expat', 'webkit-1.0']
envProg['LIBPATH'] = ['.', '../kit', '../uth', '/opt/local/lib', '../webkit.tmp/lib']
envProg['CPPPATH'] = ['src', '../kit/src', '../uth/src', '/opt/local/include', '../webkit.tmp/include']
envProg.Program('test/phnqlets_test.cc')
